/*
 * @Author: Lizhen
 * @Date: 2023-08-15
 * @LastEditors: Lizhen
 * @LastEditTime: 2023-08-15
 * @FilePath: /vite-project/src/test.js
 * @Description: 
 */
const dayjs = require('dayjs'); 
const clockTime = ['08:00', '12:00', '13:30', '18:30']
const timesArr = ['07:30', '07:50', '08:10', '12:00', '13:30', '18:30']
const firstElementIndex = clockTime.findIndex(time => dayjs(timesArr[0] + time).isBefore(dayjs(timesArr[0] + clockTime[0]), "minute"));
const lastElementIndex = clockTime.findIndex(time => dayjs(timesArr[0] + time).isAfter(dayjs(timesArr[0] + clockTime[firstElementIndex]), "minute"));
console.log(firstElementIndex);
console.log(lastElementIndex);